import { http } from '@/plugin/axios/index.js'

// 获取用户基础信息
export async function getUserInfo (params) {
  return await http.get('/h5/person/getUserInfo', { queryParam: params })
}
// 头部数据
export async function getHomeData (params) {
  return await http.get('/h5/shopUser/getHomeData', { queryParam: params })
}

// 首页列表
export async function getChanageHomeData (params) {
  return await http.get('/h5/shopUser/getChanageHomeData', { queryParam: params })
}

// 全部订单
export async function getOrderListByPage (params) {
  return await http.get('/h5/shopUser/getOrderListByPage', { queryParam: params })
}
// 修改名称
export async function updateUserName (params) {
  return await http.post('/h5/shopUser/updateUserName', params)
}
// 修改手机
export async function updatePhone (params) {
  return await http.post('/h5/shopUser/updatePhone', params)
}
// 获取验证码
export async function sendCode (params) {
  return await http.post('/h5/shopUser/sendCode', params)
}
// 发送验证码
export async function verificationCode (params) {
  return await http.post('/h5/shopUser//verificationCode', params)
}

// 分销二维码
export async function getQrCodeUrl (params) {
  return await http.get('/h5/shopUser/getQrCodeUrl', { queryParam: params })
}

export async function getBusinessConfigList (params) {
  return await http.post('/h5/shopUser/getBusinessConfigList', params)
}
// 获取二维码
export async function generateCode (params) {
  return await http.post('/h5/shopUser/generateCode', params)
}

// 意向单列表
export async function getPurposeList (params) {
  return await http.post('/h5/shopUser/getPurposeList', params)
}
// 意向单结果
export async function getPurposeDetailList (params) {
  return await http.post('/h5/shopUser/getPurposeDetailList', params)
}
// 意向单新建
export async function purposeUpload (params) {
  return await http.post('/h5/shopUser/purposeUpload', params, null, { headers: { 'Content-Type': 'multipart/form-data' } })
  // return await http.post('/h5/person/purposeUpload', params)
}
// 意向单删除
export async function deleteUser (params) {
  return await http.post('/h5/shopUser/deletePurpose', params)
}

// 退出
export async function loginOut (params) {
  return await http.post('/h5/shopUser/loginOut', params)
}
